package test_2024_4_12_01_java;

import java.util.Scanner;

public class Compute {

//	static double x;
//	static double y;
//	
//	public void show() {
//		this.x = x;
//		this.y = y;
//	}
//	
//	public static void Add(double  x, double y) {
//		System.out.println("Add:" + (x + y));
//	}
//	
//	public static void Sub(double x, double y) {
//		System.out.println("Sub:" + (x - y));
//	}
//	
//	public static void Mul(double x, double y) {
//		System.out.println("Mul:" + (x * y));
//	}
//	
//	public static void Div(double x, double y) {
//		System.out.println("Div:" + (x / y));
//	}
//	
//	
//	public static void main(String[] args) {
//		
//		Scanner input = new Scanner(System.in);
//		double x = input.nextDouble();
//		double y = input.nextDouble();
//		
//		Compute com = new Compute(); 	
//		com.Add(x, y);
//		com.Sub(x, y);
//		com.Mul(x, y);
//		com.Div(x, y);
//	}
	
	static double x;
	static double y;
	
	//初始化
	public void compute() {
		this.x = x;
		this.y = y;
	}
	
	//定义四个方法
	public void Add(double x, double y) {
		System.out.println(x + y);
	}
	
	public void Sub(double x, double y) {
		System.out.println(x - y);
	}
	
	public void Mul(double x, double y) {
		System.out.println(x * y);
	}
	
	public void Div(double x, double y) {
		System.out.println(x / y);
	}
	
	public static void main(String[] args) {
		
		//键盘输入x，y的值
		Scanner input = new Scanner(System.in);
		double x = input.nextDouble();
		double y = input.nextDouble();
		
		Compute cmp = new Compute();
		cmp.Add(x, y);
		cmp.Sub(x, y);
		cmp.Mul(x, y);
		cmp.Div(x, y);
		
		
	}
	
	
	
	
}
